<html>
<head>
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<title>Wick Digital Dailies System: Hacking the Code</title>
	<link href="root.css" rel="Stylesheet" type="text/css">
</head>

<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#9aa1a7">
			<tr height="100%">
				<td rowspan="3" width="1%"><img src="bitmaps/top-box-left.png" alt="" height="98" width="11" border="0"></td>
				<td rowspan="3" width="1%"><a href="http://wickdd.org/"><img src="bitmaps/logo.png" alt="" height="77" width="80" border="0"></a></td>
				<td width="20">&nbsp;</td>
				<td rowspan="2" valign="bottom"><a href="/"><img src="bitmaps/site-title.png" alt="" border="0" vspace="8"></a></td>
				<td rowspan="3" width="1%"><img src="bitmaps/top-box-right.png" alt="" height="98" width="11" border="0"></td>
			</tr>
			<tr>
				<td width="20">&nbsp;</td>
			</tr>
			<tr height="26">
				<td width="20" height="26">&nbsp;</td>
				<td align="right" valign="bottom" height="26">
					<img src="bitmaps/navbar-left-cap.png" alt="" border="0"><a href="userdoc.html"><img src="bitmaps/navbar-docs.png" alt="" border="0"></a><img src="bitmaps/navbar-separator.png" alt="" border="0"><a href="downloads.php"><img src="bitmaps/navbar-downloads.png" alt="" border="0"></a><img src="bitmaps/navbar-separator.png" alt="" border="0"><a href="lists.html"><img src="bitmaps/navbar-lists.png" alt="" border="0"></a><img src="bitmaps/navbar-separator.png" alt="" border="0"><a href="licenses.html"><img src="bitmaps/navbar-licenses.png" alt="" border="0"></a>
				</td>
			</tr>
		</table>
		
		<p></p>
		
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr height="21">
				<td width="25" height="21"><img src="bitmaps/body-top-left.png" alt="" height="21" width="25" border="0"></td>
				<td height="21" background="bitmaps/body-top-middle.png"></td>
				<td width="25" height="21"><img src="bitmaps/body-top-right.png" alt="" height="21" width="25" border="0"></td>
			</tr>
			<tr>
				<td width="25" background="bitmaps/body-side-left.png"></td>
				<td bgcolor="white">
					<h1>How to Hack on WickDD</h1>
					<p>The first place you need to go if you're going to work on the WickDD code is our <a href="http://code.google.com/p/wickdd/">Google Code project page</a>. You can access the source code there, file bug reports, submit patches, etc.</p>
					<p>We strongly encourage you to subscribe to the developers' <a href="lists.html">mailing list</a>. The core developers monitor that list.</p>
					<p>As for patches, please submit them to the developer list in <a
					href="http://en.wikipedia.org/wiki/Diff#Unified_format">unified
					diff format</a>. We currently have no formal system for accepting patches, but when/if we do, it will probably require that you sign the copyright over to the Pixel Corps, to keep things simple in the long term.</p>
					<h1>Python Module Documentation</h1>
					<p>The Python programs are documentated online: <a href="refman/client/ddup/">WickDD Uploader</a>, <a href="refman/server/c4d/">C4D Render Loop</a>, <a href="refman/server/rss/">RSS Generator</a>.</p>
					<h1>Client-Side Program Command Line Reference</h1>
					<h2>WickDD Uploader</h2>
					<p>From an end-user perspective, this program just handles the mechanics of transfering production files to the centralized team server, presenting a GUI interface to make interacting with it simple.</p>
					<p>Most of the program's power comes from its command line interface, however. Everything that the various upload plugins can ask wickddup to do is requested via the command line.</p>
					<h3>General usage</h3>
					<blockquote>
						<p><code>wickddup.py <nobr>[-h hostname]</nobr> <nobr>[-r remote-dir]</nobr> <nobr>[-u username]</nobr>
						<nobr>[-A author]</nobr> <nobr>[-D desc]</nobr> <nobr>[-M modifier]</nobr> <nobr>[-T type]</nobr> files...</code></p>
					</blockquote>
					<h3>Arguments</h3>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<tr>
							<td width="40"></td>
							<td colspan="3">General options:</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td valign="top" nowrap width="1%"><strong>-d</strong></td>
							<td>set program's local working directory; used to ensure that relative directories given in other arguments work as expected</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td valign="top" nowrap width="1%">-g</td>
							<td>run program in GUI mode</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-m</strong></td>
							<td>upload new / modified files only</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-o</strong></td>
							<td>suppress redirection of output streams to debug log</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td valign="top" nowrap width="1%"><strong>-V</strong></td>
							<td>set file name verification parameters; arguments are of the form INDEX=STRING, with INDEX being a number between 1 and the number of elements in the file name. The documentation of the parameters file, below, explains this in more detail.</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"></td>
							<td></td>
						</tr>
						<tr>
							<td width="40"></td>
							<td colspan="3">SFTP options:</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-h</strong></td>
							<td>host name of server to SFTP file to</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-p</strong></td>
							<td>port number on SFTP server to use (default is 22)</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-r</strong></td>
							<td>directory on SFTP server to place file into</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-u</strong></td>
							<td>user name on SFTP server</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td colspan="3" valign="bottom" height="24">Slate info options:</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-s</strong></td>
							<td>generate slate XML file</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-J</strong></td>
							<td>project name</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-S</strong></td>
							<td>scene name</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-E</strong></td>
							<td>element/shot name</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-U</strong></td>
							<td>artist name</td>
						</tr>
						<tr>
							<td width="40"></td>
							<td width="20"></td>
							<td nowrap width="1%"><strong>-N</strong></td>
							<td>notes</td>
						</tr>
					</table>
					<p>You can run the program in GUI mode (-g), in which case it gets all other required values from the GUI. Otherwise, you must give -h, -r, -u, and at least one file name; everything else is optional.</p>
					<p>The program always shows a status GUI while uploading the files. The only thing distinguishing GUI mode from command line mode is where most of the operating parameters come from, not whether there are GUI elements shown.</p>
					<p>The program understands the key file formats used by OpenSSH. There are two aspects to this:</p>
					<ul>
						<li type="disc">First, when it connects to an SFTP server, it checks the host key cache (the <tt>known_hosts</tt> file) to see if it has connected to this server before. If there is no entry for the server in the known_hosts file, wickddup pops up a dialog asking the user if they want to add the host key to the cache. If they do, the file transfer proceeds. If wickddup finds a cached key for the host and the host key matches that returned by the server, it just quietly continues onward. Finally, if there is a record for the host and the server returns a different key, either the server has changed its host key for some reason, or someone is impersonating the server, so the program warn you and asks if you want to accept the new host key anyway.
						<li type="disc">Second, wickddup understands user keys (<tt>id_rsa</tt> and <tt>id_rsa.pub</tt>). If it can find a user key, it uses that instead of a password to try to log into the SFTP server. Note that this feature doesn't work with password-protected key files.
					</ul>
					<p>wickddup looks for host and user keys in the <tt>.ssh</tt> or <tt>ssh</tt> subdirectory under your home directory. The former is generally the one to use on OS X, and the program uses the latter automatically on Windows, where &quot;dot files&quot; aren't commonplace as on *ix systems like OS X.</p>
					<p>If there is only one argument on the command line, and it is a file name, the program will try to parse this as an options file. (Called a &quot;ddo&quot; file by the developers, after the file name extension used: digital dailies options.) Rather than document the file format here, it's simplest to just run the C4D upload plugin and open the resulting .ddo file in a text editor. This mode is required to get around a limitation of C4D's COFFEE implementation. Most of the time, you can ignore that this option exists.</p>
					<h1>Server-Side Programs</h1>
					<p>There are several server-side programs in the WickDD system. They are documented here because setting them up is a developer-like activity, rather than an artist activity. If you are an artist using WickDD, the only reason to read through this is if you want a deeper understanding of what can go on in the background on the file server after you upload your files.</p>
					<h2><a id="wickddrss" name="wickddrss"></a>RSS Generator</h2>
					<p>This program walks through the specified hierarchy and indexes all files. Optionally, you can specify filenames to include or exclude by mask. This script is intended to run as a periodic background process on the server. It generates an RSS file, which allows team members to use a feed reader to download updated dailies files as they become available.</p>
					<h3>General usage</h3>
					<blockquote>
						<p><tt>wickddrss.py [-i path-to-index] [-o rss-output-path] [-u base-url] [-T rss-title]</tt></p>
					</blockquote>
					<h3>Arguments</h3>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-d</strong></td>
							<td>root directory to reference files to</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-h</strong></td>
							<td>show usage message</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-i</strong></td>
							<td>path to index</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-o</strong></td>
							<td>location to write RSS file (defaults to directory above -i)</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-r</strong></td>
							<td>recurse subdirectories</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-u</strong></td>
							<td>base URL used in RSS file</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-v</strong></td>
							<td>verbose (display options)</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-T</strong></td>
							<td>RSS feed title</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-D</strong></td>
							<td>RSS description</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-I</strong></td>
							<td>argument is wildcard giving files to include in index pass (e.g. -I *.c4d)</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-X</strong></td>
							<td>exclude files from index pass; inverse of -I (e.g. -X *.torrent)</td>
						</tr>
					</table>
					<p>Note that if both -I and -X are specified, the include list will be generated first, and any files specified by -X will be removed. Both -I and -X can be specified multiple times.</p>
					<p>The following example will generate an RSS file for the RLC team, including any Quicktime movies or TIFF files within the entire team directory, but omitting any files matching the Wick naming spec for source footage (scf) or source graphics (scg). Line breaks are for readability only.</p>
					<blockquote>
						<p><code>./wickddrss.py -i &quot;/home/teams/tms_rlc&quot; -o &quot;/home/teams/tms_rlc/index.rss&quot;<br>
								-u http://some.server-name.here/and/directory/here -r -T &quot;Wick::RLC Dailies&quot;<br>
								-D &quot;Dailies submissions for the Wick CodeWarriors (RLC) team&quot;<br>
								-I *.mov -I *.tif<br>
								-X *.rss -X ???_???_???_scf* -X ???_???_???_scg*</code></p>
					</blockquote>
					<h2><a id="c4drender" name="c4drender"></a>C4D Renderer Loop</h2>
					<p>This program manages an automatic distributed rendering mechanism for C4D. As compared to MAXON's NET Render module, it is simple and automatic on the plus side, and limited in scalability, recovery and load balancing features on the minus side. It is intended to be run as a periodic background process on the team's file server plus any render nodes to automatically render scene files overnight.</p>
					<p>It runs in one of three modes:</p>
					<ul>
						<li type="disc">Render: renders any C4D files within the specified hierarchy that don't already appear to have been rendered
						<li type="disc">Distribute: distributes scene files (plus associated textures) that don't appear to have been rendered to render nodes
						<li type="disc">Collect: returns to the server any MOV files that resulted from rendering and compiling the C4D files
					</ul>
					<h3>General usage</h3>
					<blockquote>
						<p><code>c4drender.py [-d root-path] [-r] files...</code></p>
					</blockquote>
					<h3>Arguments</h3>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-c</strong></td>
							<td>CINEMA 4D application path</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-d</strong></td>
							<td>root directory to search for files</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-r</strong></td>
							<td>recurse subdirectories</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-n</strong></td>
							<td>node name to distribute files to (give once per node)</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-s</strong></td>
							<td>server address</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-M</strong></td>
							<td>mode to run in: 0=render, 1=distribute, 2=collect</td>
						</tr>
					</table>
					<p>You must specify -c and either -d or files. If you specify both -d and files, files will be searched relative to the path.</p>
					<p>The program uses <tt>scp</tt> to transfer files between the file server and render nodes. Because it's an automated process, this pretty much requires that you set up shared host keys so the program can automatically log into the other servers.</p>
					<h2><a id="slategen" name="slategen"></a>Slate Generator</h2>
					<p>This program creates a &quot;slate&quot; image using information it parses out of an XML file in the format written by <tt>wickddup</tt> containing information entered by the user in the WickDD Upload Plugin. It writes the image out in TIFF format by default, but it can optionally use PNG format if you ask it to. The program should build and run on any *ix type system, though it is tested on and intended primarily for OS X systems.</p>
					<h3>General usage</h3>
					<blockquote>
						<p><code>slategen [-t {PNG|TIFF}] filename</code></p>
					</blockquote>
					<h3>Arguments</h3>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-t</strong></td>
							<td>image type to use (PNG or TIFF)</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>filename</strong></td>
							<td>name of XML file name to read in</td>
						</tr>
					</table>
					<p>If the given filename contains &quot;.xml&quot;, that part will be overwritten with .tif or .png, as apropriate, when creating the slate image's file name. Otherwise, .png or .tif is appended to the end of the XML file name to get the slate image file name.</p>
					<h2><a id="wickqtassy" name="wickqtassy"></a>QuickTime Assembler</h2>
					<p>This program assembles a number of TIFF images into a QuickTime movie in H.264 format. Its purpose is to take a slate created by <tt>slategen</tt> and rendered plates written out by <tt>c4drender</tt> and assemble that into a single movie file. (That file then gets sent back to the file server, where it is noticed by <tt>wickddrss</tt> and sent out to people subscribed to the dailies feed.) Because this program uses the Cocoa QTKit framework for creating QuickTime movies, it only runs on OS X.</p>
					<h3>General usage</h3>
					<blockquote>
						<p><code>wickqtassy [-f filespec] [-m movie]</code></p>
					</blockquote>
					<h3>Arguments</h3>
					<table width="100%" border="0" cellspacing="5" cellpadding="0">
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-f</strong></td>
							<td>file matching pattern for recognizing TIFF images to assemble into a movie</td>
						</tr>
						<tr>
							<td width="60"></td>
							<td nowrap width="1%"><strong>-m</strong></td>
							<td>name of generated movie file</td>
						</tr>
					</table>
				</td>
				<td width="25" background="bitmaps/body-side-right.png"></td>
			</tr>
			<tr height="21">
				<td width="25" height="24"><img src="bitmaps/body-bottom-left.png" alt="" height="24" width="25" border="0"></td>
				<td height="24" background="bitmaps/body-bottom-middle.png"></td>
				<td width="25" height="24"><img src="bitmaps/body-bottom-right.png" alt="" height="24" width="25" border="0"></td>
			</tr>
		</table>
		<p></p>
	</body>
</html>
